<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ include file="/common/common.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/cases/source/";  //应用的地址名
String listActionName = basePath+"CaseAllSource.action?op=searchjs";
String lookFrameActionName = basePath+"CaseSourceReceive_lookItemFrame.action?";
%>
<script language="javascript" src="<%=path %>/js/My97/WdatePicker.js"></script>
<script language="javascript" src="<%=path %>/jslib/orgSelect.js"></script>
<script type="text/javascript">
    		$(function(){
    			$('#inspectDept').orgSelect({
    				inspectDeptId:'inspectDept',
    		        collectDeptId:'collectDept'
    			});	
			//表格初始化
			$('#searchTable').grid({
				title:[<ce:menu/>],
				url:'<%=listActionName%>',
	            queryParams : {
					"search.taxpayerNum" : "",
					"search.involvedEnt" : "",
					"search.caseNum" : "",
					"search.recBeginDate" : "",
					"search.recEndDate" : "",
					"search.caseFrom" : "",
					"search.illegalType" : "",
					"search.inspectDept" : "",
					"search.collectDept" : ""
			    }, //用于查询的参数以及初始值
			//表头列，不建议改动
			frozenColumns : [ [ {
				field : 'ck',
				checkbox : true
			}, {
				field : 'taxpayerNumber',
				title : '纳税人识别号',
				width : 120,
				sortable : true
			}, {
				field : 'involvedEnterprice',
				title : '涉案企业',
				width : 200,
				sortable : true
			} ] ],
			//数据列，根据显示的内容进行修改
			columns : [ [

			{
				field : 'isSecret',
				title : '是否保密税源',
				width : 120,
				sortable : true,
				formatter : function(value) {
					if (value == '0') {
						return "否";
					} else if (value == '1') {
						return "是";
					}
				}
			}, {
				field : 'isImportant',
				title : '是否重点税源',
				width : 120,
				sortable : true,
				formatter : function(value) {
					if (value == '0') {
						return "否";
					} else if (value == '1') {
						return "是";
					}
				}

			}, {
				field : 'caseFromName',
				title : '案件来源',
				width : 120,
				sortable : true
			}, {
				field : 'registerDate',
				title : '登记日期',
				width : 120,
				sortable : true
			}, {
				field : 'illegalTypeName',
				title : '涉嫌违法类型',
				width : 120,
				sortable : true
			}, {
				field : 'inspectionDept',
				title : '管辖稽查局',
				width : 120,
				sortable : true
			}, {
				field : 'collectionDept',
				title : '所属征管局',
				width : 120,
				sortable : true
			}, {
				field : 'stateInfo',
				title : '状态',
				width : 120,
				sortable : true
			}

			] ],
			//功能按钮组
			toolbar : [ <ce:jsonBtn/> ]
		});
		//查询操作
		$('#search').click(function() {
			defaultSearchAction();
		});
		$('#resetSearch').click(function(){
			
		});
	});

   		function openViewPage(){
   			var rows = $('#searchTable').datagrid('getSelections');	
   			if(rows.length>1){
   				$.messager.alert("提示","请选择单条案源记录！","error");
   			}else if(rows.length==1){
   				var num=rows[0].taxpayerNumber;
   				parent.addTabs_(num+'案源查看','<%=lookFrameActionName%>&chkSelf='+rows[0].vcId);
   			}else{
   				$.messager.alert("提示","请选择案源记录！","error");
   			}
   		}
       
       function viewItem(id){
			var rows = $('#searchTable').datagrid('getSelections');	
			var num=rows[0].taxpayerNumber;
			parent.addTabs_(num+'案源查看','<%=lookFrameActionName%>&chkSelf='+id);
		}
       function saveAsExcel(){
    	   
       } 
    </script>
<html>
  <head>
    <title>检查案源台账</title>
  </head> 
<body class="easyui-layout">
<div class="div_height_auto" data-options="region:'north',border:false" style="overflow: hidden;" align="left">
       <table>
<tr>
	<td align="right">纳税人识别号：</td><td><input type="text" id="taxpayerNum" style="width:100px;"/></td>
	<td align="right">涉案企业名称：</td><td><input type="text" id="involvedEnt"  style="width:100px;"/></td>
	<td align="right">案源编号：</td><td><input type="text" id="caseNum"  style="width:100px;"/></td>
	<td align="right">接收日期：</td>
	<td><input type="text" id="recBeginDate" style="width:100px;" class="Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" readonly="true"/>&nbsp;至&nbsp;
	    <input type="text" id="recEndDate"  style="width:100px;"  class="Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" readonly="true"/>
	</td>
</tr>
<tr>
	<td align="right">案件来源：</td><td><ce:dictSelect id="caseFrom" name="caseFrom" dictName="备选案源台账-案件来源" allOption="true" style="width:100px;"/></td>
	<td align="right">涉嫌违法类型：</td><td><ce:dictSelect id="illegalType"  name="illegalType"  dictName="备选案源台账-涉嫌违法类型" allOption="true" style="width:100px;"/></td>
	<td align="right">所属稽查局：</td><td><select id="inspectDept"  style="width:100px;"></select></td>
	<td align="right">所属征管局：</td>
	<td colspan="2">
	<select id="collectDept"  style="width:100px;"></select>
	</td>
	<td rowspan="2">
	   <a id="search" href="javascript:void(0)"  class="easyui-linkbutton" iconCls="icon-search">查询</a>
	   <a id="resetSearch" href="javascript:void(0)"  class="easyui-linkbutton" iconCls="icon-redo">重置</a>
	</td>
</tr>
</table>
</div>
<div data-options="region:'center',border:false" style="overflow: hidden;">
  <table id="searchTable"></table>
</div>
</body>
</html>